package com.hanson.basicknowledge.ReflectionDemo;

import lombok.Data;

/**
 * @author Hanson
 * @date 2023/2/24 16:56
 */
@Data
public class Person {

    private String name;

    private int age;

    public Person(String name,int age){
        this.age = age;
        this.name = name;
    }

    public String setName(){
        return name;
    }

    public int setAge(){
        return age;
    }

    public void sayHello(){
        System.out.println("Hello, my name is "+name+" and I'm "+age+" years old");
    }
}
